package com.kuzan.autocloud.secutiry;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>Description: </p>
 *
 * @author kuzank
 */
@RestController
@SpringBootApplication
@EnableFeignClients
@EnableJpaRepositories(basePackages = {"com.kuzan.autocloud.common.repository"})
@EntityScan(basePackages = {"com.kuzan.autocloud.common.model"})
public class SecurityApplication {

    @Autowired
    HttpServletRequest httpServletRequest;

    @Bean
    public BCryptPasswordEncoder bCryptPasswordEncoder() {
        return new BCryptPasswordEncoder();
    }


    public static void main(String[] args) {
        SpringApplication.run(SecurityApplication.class, args);
    }

}
